<%-- 
    Document   : compare
    Created on : Jan 25, 2013, 4:02:38 AM
    Author     : KAKAIT
--%>

<%@page import="model.entity.Product"%>
<%@page import="java.util.List"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Products Comparison List - Magento Commerce</title>
<meta name="description" content="Default Description">
<meta name="keywords" content="Magento, Varien, E-commerce">
<meta name="robots" content="INDEX,FOLLOW">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" href="http://www.venustheme.com/demo/ves_megastore/skin/frontend/default/ves_megastore/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="http://www.venustheme.com/demo/ves_megastore/skin/frontend/default/ves_megastore/favicon.ico" type="image/x-icon">
<!--[if lt IE 7]>
<script type="text/javascript">
//<![CDATA[
    var BLANK_URL = 'http://www.venustheme.com/demo/ves_megastore/js/blank.html';
    var BLANK_IMG = 'http://www.venustheme.com/demo/ves_megastore/js/spacer.gif';
//]]>
</script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="css/styles.css" media="all">
<link rel="stylesheet" type="text/css" href="css/widgets.css" media="all">
<link rel="stylesheet" type="text/css" href="css/extensions.css" media="all">
<link rel="stylesheet" type="text/css" href="css/easytabs.css" media="all">
<link rel="stylesheet" type="text/css" href="css/style(5).css" media="all">
<link rel="stylesheet" type="text/css" href="css/style(4).css" media="all">
<link rel="stylesheet" type="text/css" href="css/style(3).css" media="all">
<link rel="stylesheet" type="text/css" href="css/style(6).css" media="all">
<link rel="stylesheet" type="text/css" href="css/print.css" media="print">
<script type="text/javascript" src="js/jquery1.7.2.min.js"></script>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/ccard.js"></script>
<script type="text/javascript" src="js/validation.js"></script>
<script type="text/javascript" src="js/builder.js"></script>
<script type="text/javascript" src="js/effects.js"></script>
<script type="text/javascript" src="js/dragdrop.js"></script>
<script type="text/javascript" src="js/controls.js"></script>
<script type="text/javascript" src="js/slider.js"></script>
<script type="text/javascript" src="js/js.js"></script>
<script type="text/javascript" src="js/form.js"></script>
<script type="text/javascript" src="js/menu.js"></script>
<script type="text/javascript" src="js/translate.js"></script>
<script type="text/javascript" src="js/cookies.js"></script>
<script type="text/javascript" src="js/vestheme.js"></script>
<script type="text/javascript" src="js/scriptaculous.js">
</script><script type="text/javascript" src="js/builder.js"></script>
<script type="text/javascript" src="js/effects.js"></script>
<script type="text/javascript" src="js/dragdrop.js"></script>
<script type="text/javascript" src="js/controls.js"></script>
<script type="text/javascript" src="js/slider.js"></script>
<script type="text/javascript" src="js/sound.js"></script>
<script type="text/javascript" src="js/product.js"></script>
<script type="text/javascript" src="js/jquery.easing.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/script(1).js"></script>
<script type="text/javascript" src="js/script(2).js"></script>
<script type="text/javascript" src="js/script(4).js"></script>
<script type="text/javascript" src="js/ddsmoothmenu.js"></script>
<script type="text/javascript" src="js/script(5).js"></script>
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="http://www.venustheme.com/demo/ves_megastore/skin/frontend/default/default/css/styles-ie.css" media="all" />
<![endif]-->
<!--[if lt IE 7]>
<script type="text/javascript" src="http://www.venustheme.com/demo/ves_megastore/js/lib/ds-sleight.js"></script>
<script type="text/javascript" src="http://www.venustheme.com/demo/ves_megastore/skin/frontend/base/default/js/ie6.js"></script>
<![endif]-->

<script type="text/javascript">
//<![CDATA[
Mage.Cookies.path     = '/demo/ves_megastore';
Mage.Cookies.domain   = '.www.venustheme.com';
//]]>
</script>

<script type="text/javascript">
//<![CDATA[
optionalZipCountries = ["HK","IE","MO","PA"];
//]]>
</script>
<!-- jQuery LightBoxes -->
<!-- //jQuery LightBoxes -->
<link rel="stylesheet" type="text/css" href="js/default.css" media="all">
<!-- vestempccp --><script type="text/javascript">//<![CDATA[
        var Translator = new Translate([]);
        //]]></script>
</head>
<body class="page-popup catalog-product-compare-index">
    <div>
        <div class="page-title title-buttons">
        <h1>Compare Products</h1>
        <a href="#" onclick="window.print(); return false;" class="link-print">Print This Page</a>
        </div>
        <% 
        List<Product> compare = (List<Product>)session.getAttribute("comparelList");
%>
        <table class="data-table compare-table" id="product_comparison">
            <colgroup>
                <col width="1">
            <%
                for(int i =0; i<compare.size();i++)
                {
                   float d = 100/compare.size();
                %>    
                <col width="<%= d %>%">
                
             <%}%>
            </colgroup>
            <%
            if(compare.size()>= 3)
            {
            %>
            <thead>
                <tr class="first last">
                    <th>&nbsp;</th>
                <%
                for(int i =0; i<compare.size();i++)
                {
                %>
                    <td class="a-right"><a href="<c:url value="/removeItemComparepage"><c:param name="id" value="<%= String.valueOf(compare.get(i).getProductid())%>"></c:param></c:url>" class="btn-remove" onclick="" title="Remove This Item">Remove This Item</a></td>
               <%}%>
                </tr>
            </thead>
            <% 
            } 
            %>
            <tbody>
                <tr class="product-shop-row first odd">
                    <th>&nbsp;</th>
                    <%
                for(int i =0; i<compare.size();i++)
                {
                %>
                     <td>
                         <a class="product-image" href="#" title="<%= compare.get(i).getProductname() %>"><img src="images/product/<%= compare.get(i).getPicture() %>" alt="<%= compare.get(i).getProductname() %>" height="125" width="125"></a>
                        <h2 class="product-name"><a href="#" title=" <%= compare.get(i).getProductname() %>"><%= compare.get(i).getProductname() %></a></h2>
                                        

                
                        <div class="price-box">
                           <p class="old-price">
                                    <span class="price-label">Regular Price:</span>
                                    <span class="price" id="old-price-6-compare-list-top">$<%= compare.get(i).getUnitcost() %></span></p>
                            <p class="special-price">
                                    <span class="price-label">Special Price:</span>
                                    <span class="price" id="product-price-6-compare-list-top">$<%= compare.get(i).getTotalamount() %></span></p>
                        </div>

                        <p><a href="<c:url value="/listshoppingcart"><c:param name="id" value="<%= String.valueOf(compare.get(i).getProductid())%>"></c:param><c:param name="qty" value="1"></c:param></c:url>"><button type="button" title="Add to Cart" class="button btn-cart" ><span><span>Add to Cart</span></span></button></a></p>
                    </td>
               <%}%>
                   
                </tr>
            </tbody>
            <tbody>
                <tr class="even">
                    <th><span class="nobr">Description</span></th>
                    <%
                for(int i =0; i<compare.size();i++)
                {
                %>
                    <td>
                        <div class="std">
                            <%= compare.get(i).getProductdetail() %>            
                        </div>
                    </td>
               <%}%>
                    
                </tr>
            </tbody>
            <tbody>
                <tr class="add-to-row last odd">
                    <th>&nbsp;</th>
                        <%
                for(int i =0; i<compare.size();i++)
                {
                %>
                    <td>
                        <div class="price-box">
                            <p class="old-price">
                                <span class="price-label">Regular Price:</span>
                                <span class="price" id="old-price-6-compare-list-bottom">$<%= compare.get(i).getUnitcost() %></span>
                            </p>

                            <p class="special-price">
                                <span class="price-label">Special Price:</span>
                                <span class="price" id="product-price-6-compare-list-bottom">
                                    $<%= compare.get(i).getTotalamount() %></span>
                            </p>
                    
    
                        </div>

                            <p><a href="<c:url value="/listshoppingcart"><c:param name="id" value="<%= String.valueOf(compare.get(i).getProductid())%>"></c:param><c:param name="qty" value="1"></c:param></c:url>"><button type="button" title="Add to Cart" class="button btn-cart"><span><span>Add to Cart</span></span></button></a></p>
                                                                
                    </td>
               <%}%>
                    
                </tr>
            </tbody>
        </table>
        <div class="buttons-set">
            <button type="button" title="Close Window" class="button" onclick="window.close();"><span><span>Close Window</span></span></button>
            <span class="please-wait" id="compare-list-please-wait" style="display:none;">
            <img src="images/product/opc-ajax-loader.gif" alt="Please wait..." title="Please wait..." class="v-middle"> Please wait...        </span>
        </div>
        <script type="text/javascript">
        decorateTable('product_comparison');

        /**
         * Send remove item request, after that reload windows
         */
        function removeItem(url)
        {
            new Ajax.Request(url, {
                parameters: {isAjax: 1, method: 'POST'},
                onLoading: function(){$('compare-list-please-wait').show();},
                onSuccess: function(transport) {
                    $('compare-list-please-wait').hide();
                    window.location.reload();
                    window.opener.location.reload();
                }
            });
        }
    </script>
    </div>


</body>
</html>
